<include file="Inc/header" />
<div class="margin10px">
	<form name="addpage" method="post" action="<?php echo U('admin/acl/node_edit');?>" onsubmit="return checkNode();">
    	<input type="hidden" name="node_id" value="<?php echo $detail['node_id'];?>" />
		<table class="mytable">
			<tr>
				<th colspan="2">修改节点</th>
			</tr>
			<tr>
				<td width="100" class="tdf">父节点</td>
				<td><strong><?php echo $node_parents;?></strong></td>
			</tr>
			<tr>
				<td class="tdf">节点名称：</td>
				<td><input type="text" id="node_name" name="node_name" value="<?php echo $detail['node_name'];?>" /><span></span> 例：xx添加</td>
			</tr>
			<tr>
				<td class="tdf">节点地址：</td>
				<td><input type="text" id="m_c_a" name="m_c_a" size="40" value="<?php echo $detail['m_c_a'];?>" /><span></span> 例：以“”分割（模块/控制器/动作），例子： admin/acl/node_add</td>
			</tr>
			<tr>
				<td class="tdf">节点等级：</td>
				<td>
					<select name="node_level" id="node_level">
						<option value="1" <?php if($detail['node_level'] == "1"){echo 'selected="selected"';} ?> >顶部菜单</option>
						<option value="2" <?php if($detail['node_level'] == "2"){echo 'selected="selected"';} ?> >左边一级菜单</option>
						<option value="3" <?php if($detail['node_level'] == "3"){echo 'selected="selected"';} ?> >左边二级菜单</option>
						<option value="4" <?php if($detail['node_level']!="1" && $detail['node_level']!="2" && $detail['node_level']!="3"){echo 'selected="selected"';} ?> >隐藏式菜单</option>
					</select><span></span>
				</td>
			</tr>
			<tr>
				<td class="tdf">排序：</td>
				<td><input type="text" name="px" size="3" value="<?php echo $detail['px'];?>" /></td>
			</tr>
			<tr>
				<td class="tdf">&nbsp;</td>
				<td><input type="submit" value="修改" class="button" /></td>
			</tr>
		</table>
	</form>
</div>
<script type="text/javascript">
	//检查表单
	function checkNode(){
		if($.trim($('#node_name').val())==''){
			$('#node_name').css('background-color','#ffc');
			$('#node_name').next('span').html('<font color=red> 分组名称不能为空</font>');
			$('#node_name').focus();
			return false;
		}
        if($.trim($('#m_c_a').val())==''){
            $('#m_c_a').css('background-color','#ffc');
            $('#m_c_a').next('span').html('<font color=red> 节点地址不能为空</font>');
            $('#m_c_a').focus();
            return false;
        }
        return true;
	}
</script>
<include file="Inc/footer" />